/**
 * Switch 组件的主题配置
 */

import type { ComponentToken } from 'antd/es/switch/style';

export const switchThemeConfig: Partial<ComponentToken> = {
  trackHeight: 22,
  trackHeightSM: 16,
  trackMinWidth: 44,
  trackMinWidthSM: 28,
  trackPadding: 2,
  handleBg: '#ffffff',
  handleSize: 18,
  handleSizeSM: 12,
  handleShadow: '0 2px 4px 0 rgba(0, 35, 11, 0.2)' as any,
  innerMinMargin: 24,
  innerMaxMargin: 48,
};

export const getSwitchTheme = (
  customConfig?: Partial<ComponentToken>
): Partial<ComponentToken> => {
  return {
    ...switchThemeConfig,
    ...customConfig,
  };
};

export type { ComponentToken as SwitchComponentToken } from 'antd/es/switch/style';

